﻿@*@model IEnumerable<WebUI.Models.SmsSent>*@
@model ListViewModel<CommonSearchValues, IQueryable<WebUI.Models.SmsSent>>
@{
    ViewBag.Title = "系统短信查询";
    IQueryable<aspnet_Users> Doctors = ViewBag.Doctors as IQueryable<aspnet_Users>;
    aspnet_Users tmpdr = null;
}
<fieldset>
    <legend>
        <div class="catalog-title">
            系统短信查询</div>
    </legend>

@using (Ajax.BeginForm("ManageSmsList", new { _dataonly = "yes",IsView=false }, new AjaxOptions
{ HttpMethod = "Post", LoadingElementId = "OnLoadingSpan", UpdateTargetId = "main",
OnFailure = "OnSiteError" })) {
    <div class="small-input">
        @Html.HiddenFor(m => Model.PageSize)
       <input type="hidden" name="PageIdx" id="qspidx" value="0" />
        发送人： @Html.TextBoxFor(m => m.SearchFrom.V1)&nbsp;
        接收人： @Html.TextBoxFor(m => m.SearchFrom.V2) 
        短信类型： @Html.DropDownListFor(m => m.SearchFrom.V3, new SelectList(new string[] { "", "系统短信", "短信随访", "医生留言", "随访邀请", "随访通知" }, Model.SearchFrom.V3))
        内容： @Html.TextBoxFor(m => m.SearchFrom.V5) 
        &nbsp;开始时间：@Html.EditorFor(m => m.SearchFrom.V4, "DateTimeStr")
        结束时间：@Html.EditorFor(m => m.SearchTo.V4, "DateTimeStr")
        @Helpers.SubmitButton("查询", "qssubmit")
    </div>
}
</fieldset>
<style type="text/css">
    th{white-space:nowrap;}
</style>
<table class="width">
    <tr>
        <th>
            发送人
        </th>
        <th>
            接收人
        </th>
        <th>
            电话
        </th>
        <th>
            消息类型
        </th>
        <th>
            消息内容
        </th>
        <th>
            发送时间
        </th>

    </tr>
    @{int dColor = 0;}
    @foreach (var item in Model.Data)
    {
        <tr class="tr-backColor@(dColor++%2)">

            <td>
                @Html.DisplayFor(modelItem => item.SenderName)
            </td>

            <td>
                @Html.DisplayFor(modelItem => item.ReceiverName)
            </td>
            <td>
                @Html.DisplayFor(modelItem => item.ReceiverCode)
            </td>
            <td>
                @Html.DisplayFor(modelItem => item.SmsType)
            </td>
            <td>
                @Html.DisplayFor(modelItem => item.TextMessage)
            </td>
            <td>
                @Html.DisplayFor(modelItem => item.SentTime)
            </td>
        </tr>
    }
</table>
@Html.Partial("Pagger", new PaggerViewModel { Act = "ManageSmsList", PageIdx = Model.PageIdx, PageCount = Model.PageCount, ItemCount = Model.ItemCount })
@Html.Partial("TrHilighter")
